package com.liuyi.tools.web.unusual;

/**
 * @author Mr.fmy
 * @version 1.0.0
 * @Description TODO 自定义业务异常编码
 * @createTime 2020/3/28 11:05
 */
public enum BizEnum implements IEnum {

    /**
     * 业务成功
     */
    OK("OK", "OK"),

    /**
     * 业务失败
     */
    BUSINESS_FAIL("BUSINESS_FAIL", "业务失败"),

    /**
     * 参数效验错误
     */
    PARAM_VALID("PARAM_VALID", "参数效验错误"),

    /**
     * 服务器异常
     */
    SERVER_ERROR("SERVER_ERROR", "服务器异常"),

    /**
     * 登录业务失败
     */
    LOGIN_FALL("LOGIN_FALL", "登录失败"),

    /**
     * 匿名访问
     */
    LOGIN_ENTRY_POINT("LOGIN_ENTRY_POINT", "匿名访问"),

    /**
     * 无权限访问
     */
    LOGIN_ACCESS_DENIED("LOGIN_ACCESS_DENIED", "无权限访问"),

    /**
     * 404
     */
    NOT_FOUND_ERROR("NOT_FOUND_ERROR", "404"),

    /**
     * 加密版本过低，请更新版本
     */
    CRYPTO_REQUEST_VERSION_LAST("CRYPTO_REQUEST_VERSION_LAST", "加密版本过低，请更新版本");

    private String code;
    private String defultMsg;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getDefultMsg() {
        return defultMsg;
    }

    public void setDefultMsg(String defultMsg) {
        this.defultMsg = defultMsg;
    }

    BizEnum(String code, String defultMsg) {
        this.code = code;
        this.defultMsg = defultMsg;
    }
}
